home *** CD-ROM | disk | FTP | other *** search
/ Aminet 28 / Aminet 28 (1998)(GTI - Schatztruhe)[!][Dec 1998].iso / Aminet / game / text / EAC14b.lha / EAC / Developers / Tutorials / Tutorial_07.EAC < prev    next >
Text File  |  1980-12-07  |  1KB  |  43 lines

  1. .--------------------------------------------------------------------------.
  2. |  This example shows how it is possible ADD and SUBTRACT from variables.  |
  3. |   I have firstly declared a variable called `score', and have used the   |
  4. | commands ADD: and SUB: to change to scores value. Of course, the score   |
  5. |  can go up or down by more than one if you like, just change the value   |
  6. |  at the end of the variable and colon. i.e.  ADD:score:50 , Thus adding  |
  7. |               50 to the value of score. easy uh?                         |
  8. `--------------------------------------------------------------------------'
  9.  
  10. DEC:score=0
  11. NOBUSY:
  12. WINDOW:ENGiNE Adventure Code - by Matt Briggs - Nice.
  13.  
  14. .-------------------------------------.
  15. |  Set up our START page as usual...  |
  16. `-------------------------------------'
  17.  
  18. PAGE:START
  19. CLRTEXT:
  20. ADDTEXT:Score: 
  21. ADDVAR:score
  22. ADDOPT:Add to score:Add_One
  23. ADDOPT:Subtract from score:Sub_One
  24. ENDPAGE:
  25.  
  26. .------------------------------------.
  27. |  Add one to the value of score :)  |
  28. `------------------------------------'
  29.  
  30. PAGE:Add_One
  31. ADD:score:1
  32. GOTO:START
  33. ENDPAGE:
  34.  
  35. .--------------------------------------------.
  36. |  Subtract one from the value our score :(  |
  37. `--------------------------------------------'
  38.  
  39. PAGE:Sub_One
  40. SUB:score:1
  41. GOTO:START
  42. ENDPAGE:
  43.